from flask import Flask, request
from flask import render_template

app = Flask(__name__)


@app.route("/index")
def index():
    return render_template("login.html")


@app.route("/center/add", methods=["GET", "POST"])
def add():
    if request.method == "GET":
        name = request.args.get("name")
        age = request.args.get("age")
        hobby = request.args.getlist("hobby")
        print(name + "-" + age + "-" + str(hobby))
    elif request.method == "POST":
        name = request.form.get("name")
        age = request.form.get("age")
        hobby = request.form.getlist("hobby")
        print(name + "-" + age + "-" + str(hobby))

    return "1111"


if __name__ == '__main__':
    app.run(debug=True)
